var person={
    name:"zs",
    sex:"male",
    son:{
        name:"zt",
        grade:1,
        sex:"male"
    },
    info:function () {
        alert("i am zs ,i have a son,his name is zt!");
        document.writeln("姓名："+this.name+"，性别："+this.sex);
    }
}
alert("i am zs ,i have a son,his name is zt!");
document.writeln("姓名："+person.name+"，性别："+person.sex);
document.writeln("姓名："+person.son.name+"，性别："+person.son.sex);
$(document).ready(function () {
    //通过元素标签获取所有p元素的数组
    var pArray=$("p");
    console.log(pArray.length);
    //通过元素和样式标签获取所有p元素的数组
    var pStyleArray=$("p.q");
    console.log(pStyleArray.length);
    //通过id元素标签获取所有p元素的数组
    var p=$("#w");
    console.log(p);
});

